package com.tn.tgt.easybuy.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tn.tgt.easybuy.mapper.EbUserMapper;
import com.tn.tgt.easybuy.model.EbUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EbUserServiceImpl  implements EbUserService {
    @Autowired
    private EbUserMapper ebUserMapper;

    @Override
    public EbUser login(EbUser ebUser) {
        EbUser lgnUser = ebUserMapper.selectOne(Wrappers.<EbUser>lambdaQuery().eq(EbUser::getEuUserId, ebUser.getEuUserId())
                .eq(EbUser::getEuPassword, ebUser.getEuPassword()));
        return lgnUser;

    }
}
